import type { GiteeElements } from '../../../../../../../../types/constants/personalization/gitee'
import { BaseService } from '../../../../../../../../lib/abstract/base_service'
import {
  PAGE_ELEMENTS,
  SUPPORTED_PLATFORMS,
} from '../../../../../../../../types/constants'

export class GiteeProjectPage extends BaseService {
  readonly id: string = 'gitee_project_page'
  readonly name = 'giteeProjectPage'
  elements: GiteeElements = PAGE_ELEMENTS[SUPPORTED_PLATFORMS.GITEE]
  private static instance: GiteeProjectPage

  /**
   * 获取单例实例
   */
  public static getInstance(): GiteeProjectPage {
    if (!GiteeProjectPage.instance) {
      GiteeProjectPage.instance = new GiteeProjectPage()
    }
    return GiteeProjectPage.instance
  }

  init(): void {}

  getMainStyles(): string {
    return `
#tree-slider {
  .tree-item {
    .commit-details {
      a {
        text-decoration: none !important;
      }
    }
  }
}
`
  }
}
